<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./elementui/vue.min.js"></script>
    <link rel="stylesheet" href="./elementui/index.css">
    <script src="./elementui/index.js"></script>
    <!--    <script src="./node_modules/downloadjs/download.min.js"></script>-->

</head>
<body>
<div id="example-1">
    <ul id="aaa">
        <li v-for="item in items" :key="item.message">
            {{ item.message }}
        </li>
    </ul>

    <el-button @click="click" type='primary'>点击</el-button>
    <el-button @click="filt" type='primary'>点击</el-button>
</div>

<script type="module">
    var example1 = new Vue({
        el: '#example-1',
        data: {
            items: [
                {message: 'Foo'},
                {message: 'Bar'}
            ]
        },
        methods: {
            click() {
                this.items.push({message: 'Baz'})
            },
            filt() {
                this.items = this.items.filter(item=>{
                    return item.message.match(/Foo/)
                })
            }
        }
    })
</script>
</body>
</html>
